<?php
$countzx="0";
$query = "SELECT * FROM mail WHERE login='$_COOKIE[login]' AND read1='0'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$login,$login2,$text,$read) = mysql_fetch_row($cat))
{
$countzx=$countzx+1;
}
if($countzx>0)
{
if($_GET['do'] != "game/mail/in")
echo "<small><span style='color:red'>У вас $countzx новых сообщений!</span> <a href='?do=game/mail/in'>[читать]</a><br></small>";
}
?>